home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / libraries / sslexamp2.lha / NewAlertHook.asm < prev    next >
Encoding:
Assembly Source File  |  1994-07-01  |  13.3 KB  |  721 lines

  1. ; Enhanced Alert Hook
  2. ; (c) 1994 MJSoft System Software, Martin Mares
  3.  
  4. _LVOTimedDisplayAlert    EQU    -822
  5.  
  6.     ifnd    EXEC
  7.     include    "ssmac.h"
  8.     endc
  9.     include    "values/hardware.i"
  10.  
  11. ;    opt    x+
  12.     opt    nochkimm
  13.  
  14.     ifnd    EXEC
  15.  
  16.     moveq    #-1,d0
  17.     rts
  18.  
  19. Resident    dc.w    RTC_MATCHWORD
  20.     dc.l    Resident
  21.     dc.l    EndSkip
  22.     dc.b    RTF_COLDSTART
  23.     dc.b    40            ; Version
  24.     dc.b    0            ; Type
  25.     dc.b    7            ; Priority
  26.     dc.l    HookName
  27.     dc.l    HookIDStr
  28.     dc.l    Init
  29.  
  30. ; Alert Hook Initialization
  31.  
  32. Init    mpush    d1-d7/a0-a6
  33.     move.l    4.w,a6
  34.  
  35.     move.l    a6,a1
  36.     lea    (_LVOAlert).w,a0
  37.     lea    AlertFunc(pc),a2
  38.     move.l    a2,d0
  39.     call    SetFunction
  40.     bra.s    DispAlert2
  41.  
  42.     endc
  43.  
  44. ; Auxilliary routine
  45.  
  46. CopyAlertLine    move.b    (a0)+,(a3)+
  47.     move.b    (a0)+,(a3)+
  48.     move.b    #16,(a3)+
  49. 1$    move.b    (a0)+,(a3)+
  50.     bne.s    1$
  51.     st    (a3)+
  52.     rts
  53.  
  54.     ifd    EXEC
  55. AlertHookInit    clr.l    0.w
  56.     endc
  57.  
  58. DispAlert    mpush    d1-d7/a0-a6
  59.     move.l    4.w,a6
  60. DispAlert2    movem.l    LastAlert(a6),d2-d3
  61.     moveq    #-1,d0
  62.     cmp.l    d0,d2
  63.     beq    DispNoAlert
  64.     lea    -300(sp),sp
  65.     move.l    sp,a3
  66.     pea    TTask(pc)
  67.     move.l    d2,d0
  68.     swap    d0
  69.     lea    NotEnoughMem(pc),a0
  70.     cmp.b    #1,d0
  71.     beq.s    AlertHead
  72.     lea    SoftFailure(pc),a0
  73.     tst.w    d0
  74.     ble.s    AlertHead
  75.     lea    RecoverError(pc),a0
  76. AlertHead    bsr.s    CopyAlertLine
  77.     lea    PressLMB(pc),a0
  78.     bsr.s    CopyAlertLine
  79.  
  80.     sub.l    a5,a5
  81.     btst    #0,d3
  82.     bne.s    NoTaskNameS
  83.     move.l    d3,a1
  84.     bsr.s    CheckMem
  85.     beq.s    NoTaskNameS
  86.     move.b    LN_TYPE(a1),d0
  87.     subq.b    #NT_TASK,d0
  88.     beq.s    NoProcess
  89.     cmp.b    #NT_PROCESS-NT_TASK,d0
  90.     bne.s    NoTaskName
  91.     move.l    pr_CLI(a1),d0
  92.     beq.s    NoProcess
  93.     lsl.l    #2,d0
  94.     move.l    d0,a1
  95.     bsr.s    CheckMem
  96.     beq.s    NoProcess
  97.     move.l    cli_CommandName(a1),a1
  98.     add.l    a1,a1
  99.     add.l    a1,a1
  100.     addq.l    #1,a1
  101.     addq.l    #4,sp
  102.     pea    TCommand(pc)
  103.     bra.s    IsProcess
  104.  
  105. NoProcess    move.l    d3,a1
  106.     move.l    LN_NAME(a1),a1
  107. IsProcess    move.l    a1,a4
  108.     bsr.s    CheckMem
  109.     beq.s    NoTaskName
  110.     lea    260(sp),a2
  111.     lea    297(sp),a0
  112.     move.l    a2,a1
  113.     move.b    #'(',(a1)+
  114.     tst.b    (a4)
  115.     beq.s    NoTaskName
  116. CopyTName    cmp.l    a0,a1
  117.     beq.s    CopyTNEnd
  118.     move.b    (a4)+,d0
  119.     move.b    d0,(a1)+
  120.     beq.s    CopyTNEnd
  121.     lsl.b    #1,d0
  122.     cmp.b    #64,d0
  123.     bcc.s    CopyTName
  124. NoTaskNameS    bra.s    NoTaskName
  125.  
  126. CheckMem    push    a1
  127.     call    TypeOfMem
  128.     pop    a1
  129.     tst.l    d0
  130.     bne.s    1$
  131. 2$    move.l    LN_NAME(a6),d0
  132.     clr.w    d0
  133.     sub.l    a1,d0
  134.     cmp.l    #-$80000,d0
  135.     bcc.s    1$
  136.     moveq    #0,d0
  137. 1$    rts
  138.  
  139. CopyTNEnd    move.b    #')',-1(a1)
  140.     sf    (a1)
  141. CopyTNEnd1    move.l    a2,a5
  142.  
  143. NoTaskName    pop    d0
  144.     push    a5
  145.     push    d3
  146.     push    d0
  147.     push    d2
  148.     move.l    sp,a1
  149.     lea    NumberFormat(pc),a0
  150.     lea    PFPutC(pc),a2
  151.     addq.l    #2,a3
  152.     call    RawDoFmt
  153.     bsr.s    Center
  154.     lea    16(sp),sp
  155.  
  156.     addq.l    #2,a3
  157.     move.l    a3,a4
  158.     move.b    #32,(a4)+
  159.  
  160.     ifd    YELLOW
  161.     bclr    #31,d2
  162.     move.l    d2,d0
  163.     elseif
  164.     move.l    d2,d0
  165.     bclr    #31,d0
  166.     endc
  167.  
  168.     swap    d0
  169.     tst.w    d0
  170.     beq.s    FindExcept
  171.     lsr.w    #8,d0
  172.     lea    SubSysTab(pc),a2
  173.     bsr    TabulateUpper
  174. GoColon    move.b    #':',(a4)+
  175.     move.b    #' ',(a4)+
  176.  
  177.     tst.w    d2
  178.     bgt.s    FindSpecific
  179.     move.l    d2,d0
  180.     swap    d0
  181.     bclr    #15,d0
  182.     ext.w    d0
  183.     lea    GeneralErrs(pc),a2
  184.     bsr    TabulateUpper
  185.     move.w    d2,d0
  186.     beq.s    ShowAlert
  187.     bclr    #15,d0
  188.     move.b    #' ',(a4)+
  189.     move.b    #'(',(a4)+
  190.     lea    SubSysTab(pc),a2
  191.     bsr    Tabulate
  192.     move.b    #')',(a4)+
  193.     bra.s    ShowAlert
  194.  
  195. FindExcept    lea    TExcept(pc),a2
  196.     moveq    #8,d0
  197. 1$    move.b    (a2)+,(a4)+
  198.     dbf    d0,1$
  199.     moveq    #-2,d4
  200.     bra.s    GoColon
  201.  
  202. Center    move.l    a3,a0
  203. 1$    tst.b    (a0)+
  204.     bne.s    1$
  205.     move.l    a3,d0
  206.     sub.l    a0,d0
  207.     lsl.w    #2,d0
  208.     add.w    #328,d0
  209.     move.b    d0,-(a3)
  210.     lsr.w    #8,d0
  211.     move.b    d0,-(a3)
  212.     move.l    a0,a3
  213.     st    (a3)+
  214.     rts
  215.  
  216. FindSpecific    lea    Specific(pc),a2
  217.     add.w    0(a2,d4.w),a2
  218.     move.w    d2,d0
  219.     bsr.s    TabulateUpper
  220.  
  221. ShowAlert    sf    (a4)
  222.     bsr.s    Center
  223.  
  224.     ifnd    EXEC
  225.  
  226.     lea    intuiname(pc),a1
  227.     call    OldOpenLibrary
  228.  
  229.     elseif
  230.  
  231.     moveq    #3,d0
  232.     bsr    TaggedOpenLibrary
  233.  
  234.     endc
  235.  
  236.     move.l    #AT_DeadEnd+AG_OpenLib+AO_Intuition,d7
  237.     tst.l    d0
  238.     beq    AlertFunc
  239.     move.l    LastAlert+12(a6),a1
  240.     move.l    d0,a6
  241.  
  242.     sf    -(a3)
  243.     move.l    sp,a0
  244.     move.l    d2,d0
  245.     moveq    #61,d1
  246.  
  247.     ifnd    EXEC
  248.     cmp.w    #39,LIB_VERSION(a6)
  249.     bcs.s    NotTimed
  250.     call    TimedDisplayAlert
  251.     bra.s    AlertDone
  252. NotTimed    call    DisplayAlert
  253.  
  254.     elseif
  255.     call    TimedDisplayAlert
  256.     endc
  257.  
  258. AlertDone    push    d0
  259.     move.l    a6,a1
  260.     call    exec,CloseLibrary
  261.  
  262.     clr.l    0.w
  263.     moveq    #-1,d1
  264.     move.l    d1,LastAlert(a6)
  265.     pop    d0
  266.     lea    300(sp),sp
  267. DispNoAlert    movem.l    (sp)+,d1-d7/a0-a6
  268. Ret1    rts
  269.  
  270. TabulateUpper    bsr.s    Tabulate
  271.     bclr    #5,(a0)
  272.     rts
  273.  
  274. StrXpy0    move.b    (a2)+,(a4)+
  275.     bpl.s    StrXpy1
  276.     move.b    -(a4),d0
  277. StrXpyX    mpush    d5/a2
  278.     lea    Strings(pc),a2
  279. 1$    move.b    (a2)+,d5
  280.     add.l    d5,a2
  281.     addq.b    #1,d0
  282.     bne.s    1$
  283.     move.b    (a2)+,d5
  284.     bsr.s    StrXpy1
  285.     mpop    d5/a2
  286. StrXpy1    dbf    d5,StrXpy0
  287.     rts
  288.  
  289. Tabulate    moveq    #-2,d4
  290.     moveq    #0,d5
  291.     move.l    a4,a0
  292. 1$    addq.w    #2,d4
  293.     move.b    (a2)+,d5
  294.     bpl.s    3$
  295.     addq.w    #1,d1
  296.     neg.b    d5
  297.     bra.s    2$
  298. 3$    moveq    #0,d1
  299.     move.b    (a2)+,d1
  300.     bmi.s    StrXpy1
  301.     bne.s    2$
  302.     move.b    (a2)+,d1
  303.     lsl.w    #8,d1
  304.     move.b    (a2)+,d1
  305. 2$    cmp.w    d1,d0
  306.     beq.s    StrXpy1
  307.     add.w    d5,a2
  308.     bra.s    1$
  309.  
  310. PFPutC    move.b    d0,(a3)+
  311.     rts
  312.  
  313. ; Replacement of exec/Alert()
  314.  
  315.     ifnd    EXEC
  316.  
  317. AlertFunc
  318.     ifnd    DEBUG
  319.     move.w    #INTF_INTEN,$dff000+intena
  320.     endc
  321.  
  322.     movem.l    d0-d1/a0-a1/a5-a6,-(sp)
  323.     move.l    #'HELP',d0
  324.     sub.l    a0,a0
  325.  
  326.     ifnd    DEBUG
  327.     cmp.l    (a0),d0
  328.     beq.s    BlinkAlert
  329.     move.l    d0,(a0)
  330.     endc
  331.  
  332.     lea    $100.w,a1
  333.     move.l    d7,(a1)+
  334.     move.l    a5,(a1)
  335.     move.l    4.w,d0
  336.     btst    #0,d0
  337.     bne.s    BlinkAlert
  338.     move.l    d0,a6
  339.     add.l    ChkBase(a6),d0
  340.     addq.l    #1,d0
  341.     bne.s    BlinkAlert
  342.     move.l    ThisTask(a6),a5
  343.     move.l    a5,(a1)
  344.     move.l    #$F376C7C9,d0
  345.     push    d0
  346.     cmp.l    (sp)+,d0
  347.     bne.s    BlinkAlertSP
  348.     tst.l    d7
  349.     bmi.s    BlinkAlert
  350.     lea    LastAlert(a6),a0
  351.     move.l    d7,(a0)+
  352.     move.l    a5,(a0)
  353.     bsr    DispAlert
  354.     tst.l    IDNestCnt(a6)
  355.     bge.s    YetDisabled
  356.     move.w    #INTF_SETCLR+INTF_INTEN,$dff000+intena
  357. YetDisabled    moveq    #1,d0
  358.     moveq    #5,d1
  359.     ifnd    DEBUG
  360. WaitDiskDMA    tst.w    $dff000+dskbytr
  361.     dbf    d0,WaitDiskDMA
  362.     dbf    d1,WaitDiskDMA
  363.     endc
  364.     movem.l    (sp)+,d0-d1/a0-a1/a5-a6
  365.     rts
  366.  
  367. BlinkAlertSP    lea    $400.w,sp
  368.     clr.l    -(sp)
  369.     clr.l    -(sp)
  370. BlinkAlert    movem.l    d0-d1/a0-a1/a5-a6,-(sp)
  371.     sub.l    a0,a0
  372.     tst.l    $C.w    ; Obey SinSoft's rules of VBR remapping
  373.     bne.s    1$
  374.     move.l    8.w,a0
  375. 1$    lea    MyStart(pc),a1
  376.     move.l    a1,$20(a0)
  377. MyStart    move.w    #$2700,sr
  378.  
  379.     moveq    #5,d1    ; Start blinking (6 times)
  380. ;;    lea    $dff000,a0
  381. ;;    move.w    #$174,serper(a0)
  382. Blink1    moveq    #-1,d0
  383. 1$    bset    #1,$bfe001
  384.     dbf    d0,1$
  385. 2$    bclr    #1,$bfe001
  386.     dbf    d0,2$
  387. ;;    move.w    serdatr(a0),d0
  388. ;;    move.w    #INTF_RBF,intreq(a0)
  389. ;;    and.b    #$7F,d0
  390. ;;    addq.b    #1,d0
  391. ;;    dbmi    d1,Blink1
  392.     dbra    d1,Blink1
  393.  
  394. ;;    movem.l    (sp)+,d0-d1/a0-a1/a5-a6
  395. ;; Debugging not supported ... Reboot always
  396.  
  397. RestartSystem    lea    $1000000,a0    ; Supervisor mode expected
  398.     sub.l    -$14(a0),a0
  399.     move.l    4(a0),a0
  400.     jmp    -2(a0)
  401.  
  402.     endc
  403.  
  404.     dc.w    Spec_cpu-Specific
  405. Specific    dc.w    Spec_exec-Specific
  406.     dc.w    Spec_graphics-Specific
  407.     dc.w    Spec_layers-Specific
  408.     dc.w    Spec_intuition-Specific
  409.     dc.w    Spec_math-Specific
  410.     dc.w    Spec_dos-Specific
  411.     dc.w    Spec_ram-Specific
  412.     dc.w    Spec_icon-Specific
  413.     dc.w    Spec_expansion-Specific
  414.     dc.w    Spec_diskfont-Specific
  415.     dc.w    Spec_utility-Specific
  416.     dc.w    Spec_keymap-Specific
  417.     dc.w    Spec_audio-Specific
  418.     dc.w    Spec_console-Specific
  419.     dc.w    Spec_gameport-Specific
  420.     dc.w    Spec_keyboard-Specific
  421.     dc.w    Spec_trackdisk-Specific
  422.     dc.w    Spec_timer-Specific
  423.     dc.w    Spec_cia-Specific
  424.     dc.w    Spec_disk-Specific
  425.     dc.w    Spec_misc-Specific
  426.     dc.w    Spec_bootstrap-Specific
  427.     dc.w    Spec_workbench-Specific
  428.     dc.w    Spec_diskcopy-Specific
  429.     dc.w    Spec_gadtools-Specific
  430.     dc.w    Spec_utility-Specific
  431.     dc.w    Spec_unknown-Specific
  432.  
  433. STRCNT    set    $FF
  434. str    macro
  435. K\1    equ    STRCNT
  436. STRCNT    set    STRCNT-1
  437.     dc.b    \@a-*-1,\2
  438. \@a
  439.     endm
  440.  
  441. Strings    dc.b    0
  442.     str    Library,<'library'>
  443.     str    Device,<'device'>
  444.     str    Resource,<'resource'>
  445.     str    Lib,<'.',KLibrary>
  446.     str    Dev,<'.',KDevice>
  447.     str    Res,<'.',KResource>
  448.     str    Unable,<'Unable to '>
  449.     str    Open,<'open '>
  450.     str    Close,<'Close'>
  451.     str    Failed,<' failed'>
  452.     str    Unkn0,<'unknown'>
  453.     str    Unkn,<KUnkn0,KErr>
  454.     str    Err,<' ',KErr2>
  455.     str    Err2,<'error'>
  456.     str    Mem,<' ',KMemS>
  457.     str    MemS,<KMem0,' '>
  458.     str    Mem0,<'memory'>
  459.     str    Free,<'free'>
  460.     str    Bad,<'Bad '>
  461.     str    FFP,<'FFP '>
  462.     str    MMU,<'MMU '>
  463.     str    Instr,<' instruction'>
  464.     str    Disk,<'disk'>
  465.     str    NoMF,<'No',KMem,'for '>
  466.     str    Viol,<' violation'>
  467.     str    Erflow,<'erflow'>
  468.     str    Illegal,<'illegal'>
  469.     str    Interr,<'interrupt'>
  470.     str    Attempt,<'attempt'>
  471.     str    Util,<'utility'>
  472.     str    To,<'to'>
  473.     str    Frame,<' frame'>
  474.     str    Scr,<'screen'>
  475.     str    Intui,<'intuition'>
  476.     str    Messg,<'message'>
  477.     str    Init,<'init'>
  478.     str    Line,<'line '>
  479.     str    DivZ,<'division by zero'>
  480.     str    Timer,<'timer'>
  481.     str    Already,<' already '>
  482.     str    MemList,<KMem,'list'>
  483.     str    Item,<'item'>
  484.     str    Type,<' type'>
  485.     str    Rece,<' received'>
  486.     str    Checksum,<'checksum'>
  487.     str    Obtain,<' obtain'>
  488.     str    Key,<'key'>
  489.     str    Return,<' return'>
  490.     str    Region,<'region'>
  491.     str    Failure,<' failure'>
  492.     str    Uninit,<'un',KInit,'ialized '>
  493.     str    Font,<'font'>
  494.  
  495. NotEnoughMem    dc.b    0,24
  496.     dc.b    'Not enough memory.',0
  497. SoftFailure    dc.b    0,24
  498.     dc.b    'Software failure.',0
  499. RecoverError    dc.b    0,24
  500.     dc.b    'Recoverable alert.',0
  501. PressLMB    dc.b    1,72
  502.     dc.b    'Press left mouse button to continue.',0
  503. TCommand    dc.b    'Command',0
  504. TTask    dc.b    'Task',0
  505. TExcept    dc.b    'Exception'
  506. NumberFormat    dc.b    48,'Error: %08lx    %s: %08lx %s',0
  507.     ifnd    EXEC
  508. intuiname    dc.b    'intuition.library',0
  509.     endc
  510. HookName    dc.b    'alert.hook'
  511.     ifd    EXEC
  512.     dc.b    $0D,$0A,0
  513.     elseif
  514.     dc.b    0
  515. Verstr    dc.b    '$VER: '
  516.     endc
  517. HookIDStr    dc.b    'Enhanced Alert Hook 40.3 © 1994 MJSoft System Software',0
  518.  
  519. subs    macro
  520.     dc.b    \@a-\@b,\1
  521. \@b    dc.b    \2
  522. \@a
  523.     endm
  524.  
  525. subc    macro
  526.     dc.b    \@b-\@a
  527. \@b    dc.b    \1
  528. \@a
  529.     endm
  530.  
  531. subsx    macro
  532.     dc.b    \@a-\@b,0,\1,\2
  533. \@b    dc.b    \3
  534. \@a
  535.     endm
  536.  
  537. SubSysTab    subs    $01,<'exec',KLib>
  538.     subc    <'graphics',KLib>
  539.     subc    <'layers',KLib>
  540.     subc    <KIntui,KLib>
  541.     subc    <'math',KLib>
  542.     subs    $07,<'dos',KLib>
  543.     subc    <'ram',KLib>
  544.     subc    <'icon',KLib>
  545.     subc    <'expansion',KLib>
  546.     subc    <KDisk,KFont,KLib>
  547.     subc    <KUtil,KLib>
  548.     subc    <KKey,'map',KLib>
  549.     subs    $10,<'audio',KDev>
  550.     subc    <'console',KDev>
  551.     subc    <'gameport',KDev>
  552.     subc    <KKey,'board',KDev>
  553.     subc    <'track',KDisk,KDev>
  554.     subc    <KTimer,KDev>
  555.     subs    $20,<'cia',KRes>
  556.     subc    <KDisk,KRes>
  557.     subc    <'misc',KRes>
  558.     subs    $30,<'bootstrap'>
  559.     subc    <'workbench',KLib>
  560.     subc    <KDisk,'copy'>
  561.     subc    <'gad',KTo,'ols',KLib>
  562.     subc    <KUtil,KLib>
  563.     subs    $FF,<KUnkn0>
  564.  
  565. GeneralErrs    subs    $01,<'Out of ',KMem0>
  566.     subc    <KUnable,'make ',KLibrary>
  567.     subc    <KUnable,KOpen,KLibrary>
  568.     subc    <KUnable,KOpen,KDevice>
  569.     subc    <KUnable,KOpen,KResource>
  570.     subc    <'I/O',KErr>
  571.     subc    <KUnable,'get signal'>
  572.     subc    <KBad,'parameters'>
  573.     subc    <KClose,'Device',KFailed>
  574.     subc    <KClose,'Library',KFailed>
  575.     subc    <'CreateProc',KFailed>
  576.     subs    $FF,<KUnkn>
  577.  
  578. Spec_exec    subs    $03,<KLibrary,' ',KChecksum,KFailure>
  579.     subs    $05,<'Corrupted',KMemList>
  580.     subc    <KNoMF,KInterr,' servers'>
  581.     subs    $08,<'Semaphore in ',KIllegal,' state'>
  582.     subc    <KFree,'ing',KMem,'that is',KAlready,KFree>
  583.     subs    $0B,<KAttempt,' ',KTo,' reuse active IORq'>
  584.     subc    <'Sanity check on',KMemList,KFailed>
  585.     subc    <'IO ',KAttempt,'ed on closed IORq'>
  586.     subc    <'Stack appears ',KTo,' be out of range'>
  587.     subc    <KMemS,'header not located'>
  588.     subc    <'Old ',KMessg,' semaphore used'>
  589.     subsx    $00,$FF,<'QuickInt to ',KUninit,'vector'>
  590.     subs    $FF,<KUnkn>
  591.  
  592. Spec_graphics    subs    $01,<KNoMF,'Moni',KTo,'rSpec'>
  593.     subs    $06,<KNoMF,'long',KFrame>
  594.     subc    <KNoMF,'short',KFrame>
  595.     subs    $09,<KNoMF,'Text TmpRas'>
  596.     subc    <KNoMF,'BltBitMap'>
  597.     subc    <KNoMF,KRegion,'s'>
  598.     subc    <'GfxNew',KErr>
  599.     subc    <'GfxFree',KErr>
  600.     subs    $30,<KNoMF,'MakeVPort'>
  601.     subsx    $12,$34,<'Emergency',KMem,'not available'>
  602.     subsx    $04,$01,<'Unsupported ',KFont,' description used'>
  603.     subs    $FF,<KUnkn>
  604.  
  605. Spec_intuition    subs    $01,<KUnkn0,' gadget',KType>
  606.     subc    <KNoMF,'port'>
  607.     subc    <KNoMF,KItem,' plane'>
  608.     subc    <KNoMF,'sub',KItem>
  609.     subc    <KNoMF,'plane'>
  610.     subc    <KItem,' box ',KTo,'p < RelZero'>
  611.     subc    <KNoMF,KScr>
  612.     subc    <KNoMF,KScr,' raster'>
  613.     subc    <KBad,KScr,KType>
  614.     subc    <KNoMF,'SW gadgets'>
  615.     subc    <KNoMF,'window'>
  616.     subc    <KBad,'state',KReturn,' entering ',KIntui>
  617.     subc    <KBad,KMessg,KRece,' by IDCMP'>
  618.     subc    <'Weird echo causing incomprehesion'>
  619.     subc    <KUnable,KOpen,'console',KDev>
  620.     subc    <KIntui,' skipped',KObtain,'ing a sem'>
  621.     subc    <KIntui,KObtain,'ed a sem in bad order'>
  622.     subs    $FF,<KUnkn>
  623.  
  624. Spec_dos    subs    $01,<KNoMF,'DOS startup'>
  625.     subc    <'EndTask didn''t'>
  626.     subc    <'QPkt',KFailure>
  627.     subc    <'Unexpected packet',KRece>
  628.     subc    <KFree,'Vec',KFailed>
  629.     subc    <KDisk,' block sequence',KErr>
  630.     subc    <'Bitmap corrupt'>
  631.     subc    <KKey,KAlready,KFree>
  632.     subc    <KBad,KChecksum>
  633.     subc    <KDisk,KErr>
  634.     subc    <KKey,' out of range'>
  635.     subc    <KBad,'overlay'>
  636.     subc    <KBad,KInit,' packet for CLI/Shell'>
  637.     subc    <'File handle closed twice'>
  638.     subs    $FF,<KUnkn>
  639.  
  640. Spec_ram    subs    $01,<'Overlayed ',KLibrary,' segment'>
  641.     subs    $FF,<KUnkn>
  642.  
  643. Spec_expansion    subs    $01,<KFree,'d ',KFree,' ',KRegion,' of exp space'>
  644.     subs    $FF,<KUnkn>
  645.  
  646. Spec_console    subs    $01,<KUnable,KOpen,KInit,'ial window'>
  647.     subs    $FF,<KUnkn>
  648.  
  649. Spec_trackdisk    subs    $01,<'Seek',KErr,' during calibration'>
  650.     subc    <KErr2,' on ',KTimer,' wait'>
  651.     subs    $FF,<KUnkn>
  652.  
  653. Spec_timer    subs    $01,<KBad,'request'>
  654.     subc    <'No 50/60 Hz ticks from power supply'>
  655.     subs    $FF,<KUnkn>
  656.  
  657. Spec_disk    subs    $01,<'GetUnit:',KAlready,'has ',KDisk>
  658.     subc    <KInterr,' with no active unit'>
  659.     subs    $FF,<KUnkn>
  660.  
  661. Spec_bootstrap    subs    $01,<'Boot code',KReturn,'ed an',KErr>
  662.     subs    $FF,<KUnkn>
  663.  
  664. Spec_workbench    subs    $01,<'No ',KFont,'s'>
  665.     subc    <KBad,'startup ',KMessg>
  666.     subc    <KBad,'I/O ',KMessg>
  667.     subs    $09,<'ReLayoutToolMenu',KFailed>
  668.     subs    $FF,<KUnkn>
  669.  
  670. Spec_cpu    subs    $02,<'Bus',KErr>
  671.     subc    <'Address',KErr>
  672.     subc    <KIllegal,KInstr>
  673.      subc    <KDivZ>
  674.     subc    <'CHK',KInstr>
  675.     subc    <'TRAPV',KInstr>
  676.     subc    <'Privilege',KViol>
  677.     subc    <'Trace'>
  678.     subc    <KLine,'A',KInstr>
  679.     subc    <KLine,'F',KInstr>
  680.     subs    $0D,<'Coprocessor pro',KTo,'col',KViol>
  681.     subc    <'Stack',KFrame,' format',KErr>
  682.     subc    <KUninit,KInterr>
  683.     subs    $18,<'Spurious ',KInterr>
  684.     subs    $30,<KFFP,'branch on set or unordered contition'>
  685.     subc    <KFFP,'inexact result'>
  686.     subc    <KFFP,KDivZ>
  687.     subc    <KFFP,'und',KErflow>
  688.     subc    <KFFP,'operand',KErr>
  689.     subc    <KFFP,'ov',KErflow>
  690.     subc    <KFFP,'signaling NAN'>
  691.     subs    $38,<KMMU,'configuration',KErr>
  692.     subc    <KMMU,KIllegal,' operation'>
  693.     subc    <KMMU,'invalid access level'>
  694. Spec_layers
  695. Spec_math
  696. Spec_icon
  697. Spec_diskfont
  698. Spec_audio
  699. Spec_utility
  700. Spec_keymap
  701. Spec_gameport
  702. Spec_keyboard
  703. Spec_cia
  704. Spec_misc
  705. Spec_diskcopy
  706. Spec_gadtools
  707. Spec_unknown    subs    $FF,<KUnkn>
  708.  
  709.     even
  710.  
  711.     ifd    DEBUGGING
  712. DBPrint    mpush    a0-a6/d0-d7
  713.     call    exec,RawIOInit
  714.     lea    _LVORawPutChar(a6),a2
  715.     call    RawDoFmt
  716.     mpop    a0-a6/d0-d7
  717.     rts
  718.     endc
  719.  
  720. EndSkip
  721.